import request from '@/utils/request'

// 创建验机仓
export function createCheckWarehouse(data) {
  return request({
    url: '/pekingfish/check-warehouse/create',
    method: 'post',
    data: data
  })
}

// 更新验机仓
export function updateCheckWarehouse(data) {
  return request({
    url: '/pekingfish/check-warehouse/update',
    method: 'put',
    data: data
  })
}

// 删除验机仓
export function deleteCheckWarehouse(id) {
  return request({
    url: '/pekingfish/check-warehouse/delete?id=' + id,
    method: 'delete'
  })
}

// 获得验机仓
export function getCheckWarehouse(id) {
  return request({
    url: '/pekingfish/check-warehouse/get?id=' + id,
    method: 'get'
  })
}

// 获得验机仓分页
export function getCheckWarehousePage(query) {
  return request({
    url: '/pekingfish/check-warehouse/page',
    method: 'get',
    params: query
  })
}

// 导出验机仓 Excel
export function exportCheckWarehouseExcel(query) {
  return request({
    url: '/pekingfish/check-warehouse/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}


// 验机仓入库
export function inbound(data) {
  return request({
    url: '/pekingfish/check-warehouse/inBound',
    method: 'post',
    data: data
  })
}
// 验机仓扣款
export function deductMoney(data) {
  return request({
    url: '/pekingfish/check-warehouse/deductMoney',
    method: 'post',
    data: data
  })
}

// 验机仓退货
export function returnGoods(data) {
  return request({
    url: '/pekingfish/check-warehouse/returnGoods',
    method: 'post',
    data: data
  })
}


// 扣积分
export function deductPoint(data) {
  return request({
    url: '/pekingfish/check-warehouse/deductPoint',
    method: 'post',
    data: data
  })
}

